<?php
session_start();
require('conn.php');

function addArticle($artBoard, $artTitle, $text)
{
  $selSql = "select * from tbl_user where uName = '$_SESSION[uName]';";
  // echo $selSql;
  $user = exec_select($selSql)[0];
  // echo $_SESSION['uName'];
  // var_dump($user);
  // var_dump(exec_select($selSql));
  $sql = "insert into tbl_article values(null,'$artTitle','$text',NOW(),NOW(),$user[uid],$artBoard,0);";
  return exec_update($sql);
}

function changeBoardTime($bid, $time)
{
  $sql = "update tbl_board set updated_time = '$time' where board_id = '$bid'";
  exec_update($sql);
}

?>